package com.study.springBoot;


import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.stereotype.Component;

import javax.jms.Queue;

@Component
public class SpringBootProduct {


    @Autowired
    Queue queue;

    @Autowired
    JmsMessagingTemplate jmsMessagingTemplate;
    public void productMessage(){

        jmsMessagingTemplate.convertAndSend(queue,"springBoot生产的消息");

        System.out.println("springBoot生产消息");
    }
}
